package com.networkviwer.utils;

/**
 * @version V1.0
 * @Title:
 * @Package
 * @Description:
 * @author: runoob
 * @date:
 */
public class CommonUtil {

    /**
     * 获取字符串中的汉字个数
     */
    static public int countCN(String str){
        String regEx = "[\\u4e00-\\u9fa5]";

        String term= str.replaceAll(regEx, "aa");

        return term.length()-str.length();
    }

}
